package com.ethink.warehouse.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.MateInventoryDetailOrderInfo;
import com.ethink.warehouse.api.info.MateInventoryDetailOrderMoreInfo;
import com.ethink.warehouse.api.request.MateInventoryDetailOrderAddRequest;
import com.ethink.warehouse.api.request.MateInventoryDetailOrderQueryRequest;
import com.ethink.warehouse.api.request.MateInventoryDetailOrderUpdateRequest;
import com.ethink.warehouse.api.response.MateInventoryDetailOrderAddResponse;
import com.ethink.warehouse.api.response.MateInventoryDetailOrderDeleteResponse;
import com.ethink.warehouse.api.response.MateInventoryDetailOrderQueryResponse;
import com.ethink.warehouse.api.response.MateInventoryDetailOrderUpdateResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 入库/出库明细单 Facade接口
 *
 * @author default
 * @date 2022-12-15
 */
@FeignClient(name = "ethink-warehouse-service", path = "warehouse-service/facade/v1/mateInventoryDetailOrder", contextId = "mateInventoryDetailOrderFacade")
public interface MateInventoryDetailOrderFacade {

    @PostMapping("/queryMateInventoryDetailOrder")
    @ResponseBody
    Page<MateInventoryDetailOrderQueryResponse> queryMateInventoryDetailOrder(@RequestBody MateInventoryDetailOrderQueryRequest request);

    @PostMapping("/getMateInventoryDetailOrderById")
    @ResponseBody
    MateInventoryDetailOrderInfo getMateInventoryDetailOrderById(@RequestParam("mateInventoryDetailOrderId") Long mateInventoryDetailOrderId);

    @PostMapping("/listMateInventoryDetailOrder")
    @ResponseBody
    List<MateInventoryDetailOrderMoreInfo> listMateInventoryDetailOrder(@RequestBody MateInventoryDetailOrderQueryRequest request);

    @PostMapping("/addMateInventoryDetailOrder")
    @ResponseBody
    MateInventoryDetailOrderAddResponse addMateInventoryDetailOrder(@RequestBody MateInventoryDetailOrderAddRequest request);

    @PostMapping("/updateMateInventoryDetailOrder")
    @ResponseBody
    MateInventoryDetailOrderUpdateResponse updateMateInventoryDetailOrder(@RequestBody MateInventoryDetailOrderUpdateRequest request);

    @PostMapping("/deleteMateInventoryDetailOrder")
    @ResponseBody
    MateInventoryDetailOrderDeleteResponse deleteMateInventoryDetailOrder(@RequestParam("mateInventoryDetailOrderId") Long mateInventoryDetailOrderId);

}